local thbattle__zaomiao_xinyang = fk.CreateSkill {

  name = "thbattle__zaomiao_xinyang",

  tags = {  },

}



thbattle__zaomiao_xinyang:addEffect("active", {
  prompt = "#thbattle__zaomiao_xinyang",
  min_target_num = 1,
  max_target_num = 2,
  target_filter =function (self, player, to_select, selected, selected_cards, card, extra_data)
        return #selected < 2 and not to_select:isKongcheng() and to_select ~= player

  end,
  card_filter = Util.FalseFunc,
  anim_type = "control",
  max_phase_use_time = 1,
  on_use = function(self, room, effect)
    local player = effect.from
    for _, pid in ipairs(effect.tos) do
      local target = pid
      local target_card = room:askForCard(target, 1, 1, false, thbattle__zaomiao_xinyang.name, false, ".",
        "#thbattle__zaomiao_xinyang-target_choose_card:" .. player.id)
      room:obtainCard(player, target_card, false, fk.ReasonGive, player, thbattle__zaomiao_xinyang.name)
    end
    for _, pid in ipairs(effect.tos) do
      local target = pid
      local target_card = room:askForCard(player, 1, 1, true, thbattle__zaomiao_xinyang.name, false, ".",
        "#thbattle__zaomiao_xinyang-player_give_card:" .. target.id)
      room:obtainCard(target, target_card, false, fk.ReasonGive, player, thbattle__zaomiao_xinyang.name)
    end
  end,
})

return thbattle__zaomiao_xinyang